import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: () => import("../views/Mainpage/mainpage.vue"),
    // 子路由
    children: [
      {
        path: "subpage",
        component: () => import("../views/Subpage/subpage.vue"),
      },
      {
        path: "class",
        component: () => import("../views/Subpage/class.vue"),
      },
      {
        path: "shop",
        component: () => import("../views/Subpage/shop.vue"),
      },
      {
        path: "my",
        component: () => import("../views/Subpage/my.vue"),
      },
    ],
  },
  {
    // 登录页面
    path: "/sign",
    component: () => import("../views/Subpage/Sign.vue"),
  },
  {
    path: "/Verifi",
    component: () => import("../views/Subpage/Verifi.vue"),
  },
  {
    path: "/logon",
    component: () => import("../views/Subpage/logon.vue"),
  },{
    path: "/goxpin",
    component: () => import("../views/Subpage/goxpin.vue"),
  }
];

const router = new VueRouter({
  routes,
});

export default router;
